Auto merge of #3123 - wimh:platform_versions, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 27 Sep 2016 20:03:32 +0000 (13:03 -0700)
committerGitHub <noreply@github.com>
Tue, 27 Sep 2016 20:03:32 +0000 (13:03 -0700)
commit22bd52deb1fa4d4e364ffb3f07423fe3f7af58e4
tree5fac1b9ff6ed2643c67f69a418cfb50cc35d54ec
parent26dcd3e83b90587fdc6ec256a00459ce531c0996
parent0a4fbbf25b3590df5564a97040df433bf2b3b65f
Auto merge of #3123 - wimh:platform_versions, r=alexcrichton

Don't download dependencies from other platforms

Having a Cargo.toml which looks like this:

            [package]
            name = "a"
            version = "0.0.1"
            authors = []

            [target.'cfg(unix)'.dependencies]
            foo = "0.1.0"

            [target.'cfg(windows)'.dependencies]
            foo = "0.2.0"

This would still download foo version 0.2.0 on unix. I think there is no need to do that, but please correct me if I'm wrong.

This was triggered by [this](http://stackoverflow.com/questions/39709542/why-does-the-last-platform-specific-dependency-take-precedence-in-cargo) stackoverflow question, but that situation is more complicated, as the version is the same, just the features are different. This PR will not solve that bug. If you want me to include that too, I would have to debug a bit more first....